﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true"
    CodeFile="ManagerOrder.aspx.cs" Inherits="admin_ManagerOrder" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <title>Manager Order</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderContent" runat="Server">
    <div style="float: right; margin-right: 10px">
        <asp:Label ID="Label1" runat="server" Text="Search"></asp:Label>
        &nbsp;<asp:DropDownList ID="DropDownListSearchOrder" runat="server" Width="100px">
            <asp:ListItem>All</asp:ListItem>
            <asp:ListItem>ID</asp:ListItem>
            <asp:ListItem>Approved</asp:ListItem>
            <asp:ListItem>Waiting</asp:ListItem>
        </asp:DropDownList>
        &nbsp;<asp:TextBox ID="TextBox1" runat="server" Width="200px"></asp:TextBox>
        &nbsp;
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="OK" />
    </div>
    <br />
    <br />
    <asp:UpdatePanel ID="UpdatePanelOrder" runat="server">
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="Button1" />
    </Triggers>
        <ContentTemplate>
            <asp:GridView ID="GridViewOrder" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                DataKeyNames="od_id" DataSourceID="SqlDataSourceOrder" OnSelectedIndexChanged="GridViewOrder_SelectedIndexChanged"
                Width="750px" BackColor="White" BorderColor="#999999" BorderStyle="Solid" 
                BorderWidth="1px" CellPadding="3" ForeColor="Black" GridLines="Vertical">
                <Columns>
                    <asp:BoundField DataField="od_id" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                        SortExpression="od_id" />
                    <asp:BoundField DataField="od_date" HeaderText="Order date" SortExpression="od_date" />
                    <asp:BoundField DataField="od_status" HeaderText="Status" SortExpression="od_status" />
                    <asp:BoundField DataField="od_shipping_firstname" HeaderText="Shipping Firstname"
                        SortExpression="Shipping firstname" />
                    <asp:BoundField DataField="od_shipping_email" HeaderText="Shipping email" SortExpression="od_shipping_email" />
                    <asp:BoundField DataField="od_quantity" HeaderText="Quantity" SortExpression="od_quantity" />
                    <asp:BoundField DataField="od_totalprice" HeaderText="Totalprice" SortExpression="od_totalprice" />
                    <asp:CommandField ShowSelectButton="True" />
                </Columns>
                <FooterStyle BackColor="#CCCCCC" />
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#CCCCCC" Font-Bold="True" ForeColor="Black" />
                <AlternatingRowStyle BackColor="#CCCCCC" />
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSourceOrder" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                SelectCommand="SELECT * FROM [tbl_order]"></asp:SqlDataSource>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
